package com.utils;

import lombok.Data;
import org.springframework.web.servlet.ModelAndView;

/**
 * @author arthorn
 * @create 2022-04-27-9:42
 */
@Data
public class R {
    private Boolean flag;
    private Object data;
    private String exmessage;
    private ModelAndView modelAndView;
    private Integer i;

    public R(){

    }

    public R(Boolean flag, Object data) {
        this.flag = flag;
        this.data = data;
    }
    public R(Boolean flag, Object data,ModelAndView modelAndView) {
        this.flag = flag;
        this.data = data;
        this.modelAndView = modelAndView;
    }

    public R(Boolean flag) {
        this.flag = flag;
    }

    public R(String exmessage){
        this.flag = false;
        this.exmessage = exmessage;
    }

    public R(Boolean flag, String exmessage) {
        this.flag = flag;
        this.exmessage = exmessage;
    }

    public R(Boolean flag, String exmessage,Integer i) {
        this.flag = flag;
        this.exmessage = exmessage;
        this.i = i;
    }
}
